let btn = document.querySelector('button')
let ul = document.querySelector('ul')
btn.onclick = function () {
    let input = document.createElement('input')
    input.setAttribute('placeholder', '请输入内容')
    let li = document.createElement('li')
    li.appendChild(input)
    let firstElement = ul.firstElementChild
    if (!firstElement) {
        ul.appendChild(li)
    } else {
        ul.insertBefore(li, firstElement)
    }

}